package com.tungse.study.mini_spring.sub;

import com.tungse.study.mini_spring.annotation.MyAutowired;
import com.tungse.study.mini_spring.annotation.MyComponent;
import com.tungse.study.mini_spring.annotation.MyPostConstruct;

@MyComponent(name = "myDog")
public class Dog {

    @MyAutowired
    private Cat cat;
    @MyAutowired
    private Dog dog;


    @MyPostConstruct
    public void init() {
        System.out.println("Dog init;  Dog = " + this + ";  cat = " + cat);
        System.out.println("Dog init;  Dog = " + this + ";  dog2 = " + dog);
    }
}
